package com.easy.annex.service;

import com.easy.annex.FileModel;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Optional;

/**
 * @CLASS_NAME: IFileService
 * @Description 大文件
 * @Date 2021/6/5 18:03
 * @Author lei.ren
 */
public interface IAnnexService {

    /**
     * 上传单个文件
     */
    String uploadFile(MultipartFile file);

    /**
     * 上传多个文件
     */
    List<String> uploadFiles(MultipartFile[] files);

    /**
     * 下载单个文件
     */
    void downFile(String fileId, HttpServletRequest request, HttpServletResponse response) throws IOException;

    /**
     * 删除单个文件
     */
    boolean delete(String fileId);

    /**
     * 批量删除文件
     */
    boolean batchDelete(List<String> fileIds);
}
